﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class MineField: Building
{
    float timer;
    public MineField():base()
    {
        
    }

    void Start()
    {
        currentHP = 100;
        price = 15;
    }
   
    void Update()
    {
        // 血条
        if (currentHP != 100)
        {
            reTrBloodThis.gameObject.SetActive(true);
            DrawHp();
        }
        if (timer >= 3)
        {
            GameJudge.instance.Player1.GetComponent<Resource>().AddCoin(30);
            timer = 0;
        }
        timer += Time.deltaTime;
    }

}
